/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package lib;

import java.sql.*;

/**
 *
 * @author felipe
 */
public class ErrorLog {

    public static void JavaLog(String msg, Exception e)
    {
        System.out.println(msg + e.getMessage());
    }

    public static void SQLLog(String msg, SQLException e){
        while( e != null ) {
            System.out.println(msg);
            System.out.println("SQLState: " + e.getSQLState( ));
            System.out.println("    Code: " + e.getErrorCode( ));
            System.out.println(" Message:" + e.getMessage( ));
            e = e.getNextException( );
        }
    }

}
